package toolkit;

import java.util.logging.Level;
import java.util.logging.SimpleFormatter;

public class Logger
{
	java.util.logging.Logger logger;
	
	public Logger()
	{
		logger = java.util.logging.Logger.getLogger("project_4_server");
		logger.setLevel(Level.ALL);
	}
	
	public void log(Level level, String message)
	{
		log(level, message, null);
	}
	
	public void log(Level level, String message, Exception exception)
	{
		logger.log(level, message, exception);
		
		if (level == Level.SEVERE)
		{
			System.exit(-1);
		}
	}
}
